<?php
/*=============================================================================
|| ##################################################################
||	phpFoX Konsort
|| ##################################################################
||	
||	Copyright		: (C) 2005-2007 PHPFOX Limited a Reality Fox Creation
||	Contact			: info@phpfox.com
||
||	- phpFoX and all of its source code and files are protected by Copyright Laws. 
||
||	- The license for phpFoX permits you to install this software on a single domain (.com, .org, .net, etc.). 
||
||	- You may also not remove this copyright screen which shows the copyright information and credits for phpFoX (RealityFOX Creations). 
||
||	- phpFoX Konsort is NOT a FREE software - http://www.phpfox.com/license/
||
|| ##################################################################
=============================================================================*/

/* $File: ./include/modules/Account/classes/PhpFox_ComponentGroupRecentLogins.class.php, $Author:  $ */



/** Display recent logins
 * 
 * Parameters:
 * 1. quantity - number of recent logins
 * 
 * @package module.account
 * @version $Id: PhpFox_ComponentGroupRecentLogins.class.php 46 2007-12-14 23:12:21Z phpfoxsv $
 *   
 */
class PhpFox_Mod_Account_ComponentGroupRecentLogins extends BaseComponent
{

    /** Processing method
     */
	function process()
	{
	    $oSrvAcc = $this->_oModule->getService('Account');
	    /* @var $oSrvAcc PhpFox_Mod_Account_ServiceAccount */
  
         $aLogins = $oSrvAcc->getRecentLogins($this->getParam('quantity', 8), 'group');
         $oTpl = $this->_oModule->getTemplate();
         
         
         $oTpl->assign(array(
             'aLogins'   => $aLogins,
             'sImageUrl' => App::getParam('user.pic.url'),
             'sProfileUrl' => $this->getParam('url_profile', 'public.account.profile'),
         ));
         
         $srcHtml = $oTpl->fetch('GroupsRecentLogins.html');

         return $srcHtml;
	}

}
?>